package com.forenow.demo.demo12;

public class Hero extends ActionCharacter implements CanFly,CanSwim {
        String name="Tom";
        public  void Hero(String name){
            this.name=name;
        }

    @Override
    public void fight() {
        System.out.println(name+" can fight");
    }

    @Override
    public void fly() {
        System.out.println(name+" can fly");

    }

    @Override
    public void swim() {
        System.out.println(name+" can swim");

    }
}
